from pyquery import PyQuery as pq

html="""
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 </head> 
 <body> 
  <h1>Unauthorized ...</h1> 
  <h2> IP Address: 219.147.95.198<br /> MAC Address: <br /> Server Time: 2018-03-06 22:11:02<br /> Auth Result: 无效用户. </h2>  
 </body>
</html>"""

doc=pq(html)
print("11:  ",  doc('h3').text())